﻿<!DOCTYPE HTML>
<html lang="zh">
<head>
<title>驱动器函数列表 | AutoHotkey v2</title>
<meta name="description" content="This page lists functions 遍历 retrieving various types of information about the computer's drive(s), or making a variety of changes to a drive." />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
<script type="text/javascript">$(function(){0<=window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")&&CaoNiMaDeUc()})</script>
</head>
<body>

<h1>驱动器函数</h1>

<p>用于检索有关计算机驱动器的各种类型的信息, 或对驱动器进行各种更改的函数. 点击函数名获取详细信息.</p>
<table class="info">
    <tr>
        <th>函数</th>
        <th>描述</th>
    </tr>
    <tr>
        <td><a href="DriveEject.htm">光驱托盘</a></td>
        <td>弹出或收回指定 CD/DVD 驱动器的托盘.</td>
    </tr>
    <tr>
        <td><a href="DriveGetCapacity.htm">获取驱动器总容量</a></td>
        <td>返回包含指定路径的驱动器的总容量, 单位为 mb(兆字节).</td>
    </tr>
    <tr>
        <td><a href="DriveGetFileSystem.htm">获取驱动器文件系统类型</a></td>
        <td>返回指定驱动器的文件系统的类型.</td>
    </tr>
    <tr>
        <td><a href="DriveGetLabel.htm">获取驱动器卷标</a></td>
        <td>返回指定驱动器的卷标.</td>
    </tr>
    <tr>
        <td><a href="DriveGetList.htm">获取驱动器列表</a></td>
        <td>返回一串字母, 系统中的每个驱动器字母对应一个字符.</td>
    </tr>
    <tr>
        <td><a href="DriveGetSerial.htm">获取驱动器序列号</a></td>
        <td>返回指定驱动器的卷序列号.</td>
    </tr>
    <tr>
        <td><a href="DriveGetSpaceFree.htm">获取驱动器剩余空间</a></td>
        <td>包含指定路径的驱动器的空闲磁盘空间, 单位为 mb(兆字节).</td>
    </tr>
    <tr>
        <td><a href="DriveGetStatus.htm">获取驱动器状态</a></td>
        <td>返回包含指定路径的驱动器的状态.</td>
    </tr>
    <tr>
        <td><a href="DriveGetStatusCD.htm">获取光盘状态</a></td>
        <td>返回指定 CD/DVD 驱动器的媒体状态.</td>
    </tr>
    <tr>
        <td><a href="DriveGetType.htm">获取驱动器类型</a></td>
        <td>返回包含指定路径的驱动器类型.</td>
    </tr>
    <tr>
        <td><a href="DriveLock.htm">锁定驱动器</a></td>
        <td>阻止指定驱动器的弹出功能正常工作.</td>
    </tr>
    <tr>
        <td><a href="DriveSetLabel.htm">设置驱动器卷标</a></td>
        <td>更改指定驱动器的卷标签.</td>
    </tr>
    <tr>
        <td><a href="DriveUnlock.htm">解锁驱动器</a></td>
        <td>恢复指定驱动器的弹出功能.</td>
    </tr>
</table>

<h2 id="Error_Handling">错误处理</h2>
<p>失败时抛出异常.</p>

<h2 id="Related">相关</h2>
<p><a href="index.htm">所有函数列表</a></p>

<h2 id="Examples">示例</h2>
<div class="ex" id="ExAnalyzeDrive">
<p><a href="#ExAnalyzeDrive">#1</a>: 允许用户选择一个驱动器来分析它.</p>
<pre>folder := 目录选择框( , 3, "Pick a drive to analyze:")
如果 not folder
    返回
信息框
(
    "All Drives: " 获取驱动器列表() "
    Selected Drive: " folder "
    Drive 类型: " 获取驱动器类型(folder) "
    Status: " 获取驱动器状态(folder) "
    Capacity: " 获取驱动器总容量(folder) " MB
    Free Space: " 获取驱动器剩余空间(folder) " MB
    Filesystem: " 获取驱动器文件系统类型(folder) "
    Volume Label: " 获取驱动器卷标(folder) "
    Serial Number: " 获取驱动器序列号(folder)
)</pre>
</div>

</body>
</html>